// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import router from './router'
import WechatPlugin from 'vux/src/plugins/wechat/index.js'
import Tabbar from 'vux/src/components/tabbar/tabbar.vue'
import TabbarItem from 'vux/src/components/tabbar/tabbar-item.vue'
import Group from 'vux/src/components/group/index.vue'
import Cell from 'vux/src/components/cell/index.vue'
import CellBox from 'vux/src/components/cell-box/index.vue'
import CellFormPreview from 'vux/src/components/cell-form-preview/index.vue'
import Badge from 'vux/src/components/badge/index.vue'
import ViewBox from 'vux/src/components/view-box/index.vue'
import Xbutton from 'vux/src/components/x-button/index.vue'
import Confirm from 'vux/src/components/confirm/index.vue'
import Alert from 'vux/src/components/alert/index.vue'
import Popover from 'vux/src/components/popover/index.vue'
import XDialog from 'vux/src/components/x-dialog/index.vue'
import { AlertPlugin, ConfirmPlugin, InlineXSwitch  } from 'vux'
// import Badge from 'vux/src/components/badge/index.vue'
// import userService from './api/user'

Vue.use(VueRouter)
Vue.use(WechatPlugin)
Vue.use(AlertPlugin)
Vue.use(ConfirmPlugin)
Vue.component('tabbar', Tabbar)
Vue.component('tabbar-item', TabbarItem)
Vue.component('group', Group)
Vue.component('cell', Cell)
Vue.component('cell-box', CellBox)
Vue.component('inline-x-switch', InlineXSwitch )
Vue.component('cell-form-preview', CellFormPreview)
Vue.component('badge', Badge)
Vue.component('view-box', ViewBox)
Vue.component('x-button', Xbutton)
Vue.component('confirm', Confirm)
Vue.component('alert', Alert)
Vue.component('popover', Popover)
Vue.component('x-dialog', XDialog)

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  render: h => h(App)
}).$mount('#app-box')
